package com.itheima.day02;

import java.util.Scanner;

public class HomeWork {
    public static void main(String[] args) {
/*
        byte a=12;
        short b=21;
        char c='S';
        int d=20;
        long e=782819910000L;
        float f=32.89F;
        double g=3.1456;
        boolean h=false;

        System.out.println(a);
        System.out.println(b);
        System.out.println(c);
        System.out.println(d);
        System.out.println(e);
        System.out.println(f);
        System.out.println(g);
        System.out.println(h);
 */
/*

    int numMember=100;
    double price=55.55;
    long year=4600000000L;
    boolean num=false;

    System.out.println(numMember);
    System.out.println(price);
    System.out.println(year);
    System.out.println(num);
*/


/*

    int a=10;
    int b=20;
    System.out.println(a+"+"+b+"="+(a+b));
*/


/*
        Scanner sc=new Scanner(System.in);

        System.out.println("请输入父亲身高(单位:厘米):");
        double fh=sc.nextInt();

        System.out.println("请输入母亲身高(单位:厘米):");
        double mh=sc.nextInt();

        //计算儿子的身高:
        double sh=(fh+mh)*1.08/2;

        //计算女儿的身高:
        double gh=(fh*0.923+mh)/2;

        System.out.println("儿子的身高为:"+sh);
        System.out.println("女儿的身高为:"+gh);
    */

   /*     int r=21;
        int g=24;

        r=r*2+3;
        g*=2;

        System.out.println("红和绿金额相同?"+(r==g));
*/

       /* double PI=3.14;

        Scanner sc=new Scanner(System.in);
        System.out.println("请输入圆柱体半径:");
        double r=sc.nextDouble();
        System.out.println("请输入圆柱体高:");
        double h=sc.nextDouble();

        //计算面积
        double  S= r*r*PI;
        //计算体积
        double  V=S*h;

        System.out.println("面积是:"+S);
        System.out.println("圆柱体的体积是:"+V);
*/

    /*    Scanner sc=new Scanner(System.in);

        System.out.println("请输入学生1年龄:");
        int sAge1=sc.nextInt();

        System.out.println("请输入学生2年龄:");
        int sAge2=sc.nextInt();

        System.out.println("请输入学生3年龄:");
        int sAge3=sc.nextInt();

        int tempMax=sAge1 > sAge2 ? sAge1 :sAge2;
        int Max=tempMax > sAge3 ?tempMax :sAge3;

        System.out.println("年龄最大的是:"+Max+"岁.");
    */



                Scanner sc=new Scanner(System.in);

                System.out.println("@@@欢迎使用黑马计算器@@@");

                System.out.println("选择运算方式[1加法/2减法/3乘法/4除法/5取余]：");
                int input=sc.nextInt();

                System.out.println("请输入第一个整数:");
                int a=sc.nextInt();
                System.out.println("请输入第二个整数");
                int b=sc.nextInt();
                if(input ==1){
                    System.out.println("用户选择加法运算");
                    System.out.println(a+"+"+b+"="+(a+b));

                }
                else if(input ==2){
                    System.out.println("用户选择减法运算");

                    System.out.println(a+"-"+b+"="+(a-b));

                }
                else if(input ==3){
                    System.out.println("用户选择乘法运算");

                    System.out.println(a+"*"+b+"="+(a*b));

                }
                else if(input ==4){
                    System.out.println("用户选择除法运算");

                    System.out.println(a+"/"+b+"="+(a/b));

                }
                else if(input ==5){
                    System.out.println("用户选择取余运算");

                    System.out.println(a+"%"+b+"="+(a%b));

                }


    }
}
